import React from "react"

const Main =React.lazy(()=>import('../pages/Main'))

const Erro =React.lazy(()=>import('../pages/Erro/404'))

const Have =React.lazy(()=>import('../pages/Main/Have'))

const Message =React.lazy(()=>import('../pages/Main/Message'))

const My =React.lazy(()=>import('../pages/Main/My'))

const Position =React.lazy(()=>import('../pages/Main/Position'))

const Detail =React.lazy(()=>(import('../pages/Detail')))

export const footerList=[{
    path:'/main/position',
    name:'职位',
    element:<Position/>,
    icon:<i className='iconfont icon-suoshuzhiwei'></i>
},{
    path:'/main/have',
    name:'有了',
    element:<Have/>,
    icon:<i className='iconfont icon-bixin'></i>
},{
    path:'/main/message',
    name:'消息',
    element:<Message/>,
    icon:<i className='iconfont icon-xiaoxi'></i>
},{
    path:'/main/my',
    name:'我的',
    element:<My/>,
    icon:<i className='iconfont icon-wode'></i>
},]

const routes=[{
    path:'/main',
    element:<Main/>,
    children:footerList
},{
    path:'/detail/:id',
    element:<Detail/>
},{
    path:'/404',
    element:<Erro/>
},{
    from:'/',
    to:'/main/position',
}]

export default routes